/*
 * @Author: ૮₍ ˙О˙₎ა
 * @Date: 2023-08-29 19:41:07
 */
import { defineStore } from 'pinia'

export const useEchartsStore = defineStore('echarts', {
  state: () => {
    return {
      echartsData: {} as any,
    }
  },
  actions: {
    getEchartsData(data: any) {
      if (data.type === 'update') {
        this.echartsData = { ...this.echartsData, ...data }
      } else {
        this.echartsData = data
      }
    },
  },
})
